const path = require("path");
const webpack = require("webpack");

module.exports={
	entry:__dirname + "/src/main.js",
	output:{
 		path: path.resolve(__dirname, './dist'), // 项目的打包文件路径
        publicPath: '/dist/', // 通过devServer访问路径
		filename:"build.js"
	},
	devServer:{
		historyApiFallback: true,
        overlay: true
	},
	resolve: {
        alias: {
            'vue$': 'vue/dist/vue.esm.js'
        }
    },
    module:{
    	rules:[{
    		test:/\.css$/,
    		use:["vue-style-loader","css-loader"]
    	},
    	{
    		test:/\.less$/,
    		use:["vue-style-loader","css-loader","less-loader"]
    	}
    	]
    }
}